The Dynamic Host Configuration Protocol (DHCP) can be used to assign internet protocol (IP) addresses, subnet masks, default gateways, and other IP configuration parameters. DHCP-configured clients can connect to a network and broadcast a request to a DHCP server, which manages a pool of IP addresses and information about client configuration as part of this process.
DHCP provides several modes for allocating IP addresses, including the well-known dynamic mode. In this mode, upon receipt of a valid request, the server can allocate an IP address and assign a lease (the length of time for which the allocation is valid) to the client. Thus, the client is “leased” an IP address for a period of time, generally ranging from hours to months. In this way, the DHCP server can automatically allocate IP addresses via the lease mechanism, and then maintain a mapping between the client media access control (MAC) address and the allocated IP addresses. The lease mechanism is meant to prevent allocation of IP addresses to machines that are no longer in the network.
When an IP address allocation request is received, the DHCP server doesn't know whether the request comes from a physical machine, or a virtual machine (VM), which can be created and destroyed at will. This can sometimes lead to erratic address management behavior, since the DHCP server is generally unaware of VM life cycle events. For example, when a VM is repeatedly cloned, a new IP address may be assigned to each clone, even when such cloning is unauthorized. Further, when a VM is destroyed, the DHCP server may permit the allocated IP address to remain allocated long past the time of the destruction. Thus, in a virtualized environment, IP address management can be problematic.